xl: make return type of create_domain() more consistent.
authorDario Faggioli <dario.faggioli@citrix.com>
Thu, 7 Apr 2016 15:32:13 +0000 (17:32 +0200)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 8 Apr 2016 14:07:20 +0000 (15:07 +0100)
commiteeecf9d7615266bcbc0d26e1b73f0d906742cf51
tree96228252c742f5d1e64c77dfb19b58c65a5978c8
parent0742044fd4b8318a6a0c196746dc9af9b10c9674
xl: make return type of create_domain() more consistent.

create_domain() is of uint32_t return type, because on
success it returns the domid of the new domain, and
uint32_t is what we typically use for domid-s.

However, on failure, it returns ERROR_FAIL or ERROR_INVAL,
which are -3 and -6. Callers assign the return value to an
'int rc' variable and then check for '(rc < 0)'.

Although things work, and no tool (compiler, Coverity, ecc.)
is complaining, using 'int' as return type seems better.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/xl_cmdimpl.c